<script>
import { nextTick } from "vue";

export default {
  data() {
    return {
      isRouterAlive: true
    };
  },
  methods: {
    reload() {
      this.isRouterAlive = false;
      nextTick(() => {
        this.isRouterAlive = true;
      });
    }
  },
  provide() {
    return {
      reload: this.reload
    };
  }
};
</script>

<template>
  <div class="manager">
    <my-breadcrumb />
    <div class="header">
      <h2>系统数据管理</h2>
      <p>
        <router-link class="button" to="/admin/user">用户管理</router-link>
      </p>
    </div>
    <div class="block">
      <router-view v-if="isRouterAlive" />
    </div>
  </div>
</template>

<style scoped></style>
